<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddColumnWarehouseRentInfoToOpenShopSiteLocationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('open_shop_site_locations', function (Blueprint $table) {
            $table->string('warehouseFixedRent', 7)->default('')->comment('仓库年房租');
            $table->unsignedTinyInteger('warehouseRentPaymentCycle')->default(0)->comment('仓库租金支付周期');
            $table->string('warehouseDeposit', 7)->default('')->comment('仓库押金');
            $table->string('warehouseLeaseTerm', 4)->default('')->comment('仓库租期');
            $table->string('warehouseRentFreePeriod', 4)->default('')->comment('仓库免租期');
            $table->string('doubleWaimai', 4)->default('')->comment('上线的外卖 1-美团  2-饿了么');
            $table->unsignedTinyInteger('douyin')->default(0)->comment('抖音是否上线');
            $table->unsignedTinyInteger('franchiseesKnow')->default(0)->comment('证照办理加盟商是否知晓');
            $table->unsignedTinyInteger('shopFacadeType')->default(0)->comment('门面类型');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('open_shop_site_locations', function (Blueprint $table) {
            $table->dropColumn('warehouseFixedRent');
            $table->dropColumn('warehouseRentPaymentCycle');
            $table->dropColumn('warehouseDeposit');
            $table->dropColumn('warehouseLeaseTerm');
            $table->dropColumn('warehouseRentFreePeriod');
            $table->dropColumn('doubleWaimai');
            $table->dropColumn('douyin');
            $table->dropColumn('franchiseesKnow');
            $table->dropColumn('shopFacadeType');
        });
    }
}
